﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>红河移动员工考试平台</title>
    
    <link href="css/Jqbox.css" rel="stylesheet" type="text/css" />
    <link href="css/jquery.loadmask.css" rel="stylesheet" type="text/css" />
    <script src="Js/jquery-1.5.2.min.js" type="text/javascript"></script>
    <script src="Js/jquery.dialog.js" type="text/javascript"></script>
    <script src="Js/jquery.loadmask.min.js" type="text/javascript"></script>
    <script src="Js/conmon.js" type="text/javascript"></script>
     <style type="text/css">
*{
margin:0 auto;padding:0;
font-family: "微软雅黑", "宋体", Arial, sans-serif; font-size: 12px;
}
html, body, #wrap {height: 100%;}
#wrap {min-height: 100%;}
#main {overflow:auto;
 padding-bottom: 90px;} /* 必须使用和footer相同的高度 */

#footer {position: relative;
 margin-top: -90px; /* negative value of footer height */
 height: 90px;
 clear:both;
 background:#456789;
 }

/*Opera Fix*/
body:before {
 content:"";
 height:100%;
 float:left;
 width:0;
 margin-top:-32767px;
}

#show
{
position:absolute; 
width:550px; 
height:100px; 
left:37%; 
top:50%; 
z-index:1; 
margin-left:-150px; 
margin-top:-32px 
}
  </style>
    <script type="text/javascript">
        var allowLogin = true;
        window.document.onkeydown = function (e) {
            var evt = e ? e : (window.event ? window.event : null);
            var keycode = evt.keyCode ? evt.keyCode : evt.which ? evt.which : evt.charCode;
            if (keycode == 13) {
                if (document.activeElement.type == "text" || document.activeElement.type == "password") {
                    login('LOGIN');
                }
            }
        }
        function onLoad() {
            var userIdObj = document.getElementById("userId");
            if (userIdObj && userIdObj.value == "") {
                userIdObj.focus();
            } else {
                var userPwdObj = document.getElementById("userPwd");
                if (userPwdObj) userPwdObj.focus();
            }
        }

        function chk() {
            var err = "";
            if ($("#userId").val() == "")
                err = "请输入手机号码!";

            else if (!chkMoblie($("#userId").val())) {
                err = "手机号码输入不正确"
            }
            if (err != "") {
                showErrorTip(err);
                $("#userId").select();
                return false;
            }
            err = "";
            if ($("#userPwd").val() == "")
                err = "密码不能为空!";
            if (err != "") {
                showErrorTip(err);
                $("#userPwd").select();
                return false;
            }
            return true;
        }


        function CloseReg() {
            closeDialog();
        }

        function login() {
            if (chk()) {
                var pars = { ph: $("#userId").val(), pwd: $("#userPwd").val() };
                $("#CenterAreaBg").mask("数据处理中，请稍候......");


                $.getJSON('WebServer/UserManage.ashx?Action=Login&rnd=' + Math.random(), pars, function (data) {
                    if (data.IsSuccess == 1) {
                        $("#CenterAreaBg").unmask();
                        if (data.Data.m_status == -1) {
                            showAlertTip("您已注册成功, 请等待管理员审核");
                        } else if (data.Data.m_status == 1) {
                            showAlertTip("您的帐号已被屏蔽.请与管理员联系");
                        } else if (data.Data.m_status == 0) {
                            window.location.href = "main.htm?rnd=" + Math.random();
                        }
                    } else {
                        $("#CenterAreaBg").unmask();
                        showErrorTip(data.Msg);
                    }
                });

            }

        }

    </script>
</head>
<body>
<!--[if lte IE 6]>
   <script src="Js/killie6.utf-8.js" type="text/javascript"></script>
<![endif]-->


    <div id="wrap">
        <div id="main">
            <div style="background-color: #456789; height: 130px;">
            </div>
            <div id="content">
                <div id="show">
                    <div style="width: 262px; height: 99px; background-image: url(images/u14_original.png);
                        background-repeat: no-repeat; float: left;">
                    </div>
                    <div style="float: right">
                        <div style="padding-left: 10px; padding-top: 10px;">
                            <span style="float: left; padding-right: 5px;">手机号码:</span>
                            <input size="20" class="TextField" id="userId" type="text" name="userId" maxlength="11" />
                        </div>
                        <div style="padding-left: 10px; padding-top: 10px;">
                            <span style="float: left; padding-right: 5px;">员工密码:</span>
                            <input size="20" class="TextField" id="userPwd" type="password" name="userPwd" />
                        </div>
                        <div style="padding-left: 10px; padding-top: 10px;">
                            <span style="padding-left: 105px;">
                                <img src="images/u4_original.png" onclick="login('LOGIN');" />
                                
                            </span><span style="padding-left: 5px;">
                                
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="footer">
    </div>

</body>
</html>
